package com.thirteengroup.casemg.Mapper;

import com.thirteengroup.casemg.domain.customer;
import com.thirteengroup.casemg.domain.queryObject;
import com.thirteengroup.casemg.domain.statisticsQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface customerMapper {


    List<customer> selectAll(queryObject queryObject);
    customer selectOne(Long id);
    int selectCount(queryObject queryObject);

    /**
     * 根据inputUser分组
     * @param queryObject
     * @return
     */
    List<statisticsQuery> statisticsInputUser(queryObject queryObject);

    /**
     * 根据时间分组
     * @param queryObject
     * @return
     */
    List<statisticsQuery> statisticsTime(queryObject queryObject);

    int insertOne(customer customer);
    int updateOneByid(customer customer);
    int deleteByid(Long id);
    void updateInputUser(@Param("inputUserId")Long inputUserId , @Param("id") Long id);

}
